<?php

/**
 *
 * @copyright	Copyright 2009-2012   庆丰裕软件工作室
 * @author	Zheng HanWei <315933614@qq.com
 * @link	http://www.qfyu.net/
 *  
 * */
include_once("config/usergroup.php");
include_once("lang/$config[language]/company_type_config.php");
include_once("includes/page_utf_class.php");

$sql="update ".TRAINVID." set clicks=clicks+1 where id=".$_GET['id'];
$db->query($sql);
$sql="select * from ".TRAINVID." where id=".$_GET['id'];
$db->query($sql);
$video=$db->fetchRow();
$tpl->assign("video", $video);

$sql="select * from ".TRAINVID." where cat =".$video['cat']." and id !=".$video['id']." limit 5";
$db->query($sql);
$xgvideo=$db->getRows();
$tpl->assign("xgvideo", $xgvideo);

include_once("footer.php");
$out = tplfetch("train_view.htm", $flag);
?>
